#Makefile

CC = g++
CPPFLAGS += -g -Wall -O2 -std=c++0x -Wno-deprecated   -I 
INCLUDE := $(shell pwd)/header/
OBJ := $(shell pwd)/src/main.o
#SELECT := $(shell pwd)/src/select_model.o
EPOLL := $(shell pwd)/src/epoll_model.o
#POLL := $(shell pwd)/src/poll_model.o
MEMPOOL := $(shell pwd)/src/mempool.o
CONNECTION := $(shell pwd)/src/connection.o
WORKERTHREAD := $(shell pwd)/src/workerThread.o
LISTENTHREAD := $(shell pwd)/src/listenThread.o
THREAD := $(shell pwd)/src/thread.o
CONFMGR := $(shell pwd)/src/confMgr.o
COMMAND := $(shell pwd)/src/commandTree.o
UTILS := $(shell pwd)/src/utils.o
SERVER := $(shell pwd)/src/server.o
LOG := $(shell pwd)/src/log.o
OBJ +=  $(EPOLL) $(CONNECTION) $(MEMPOOL) $(THREAD) $(LISTENTHREAD) $(CONFMGR) $(UTILS) $(COMMAND) $(WORKERTHREAD) $(SERVER) $(LOG)
BIN := server
CPPFLAGS += $(INCLUDE)
debug:$(OBJ)
	$(CC) -o $(BIN) $(OBJ) -lstdc++ -lpthread

clean:
	rm -rf $(BIN)
	rm -ff $(shell pwd)/src/*.o
